GET

Syntax: GET [#channel\file_position,] {var1 {,var} }
    or: GET [#channel,] var {,var}
Location: Toolkit II, THOR XVI

This command, together with PUT, helps to provide the QL with a means of using a file as a store for variables.

The QL stores variables internally in one of four ways:

short% (range -128 to 127)
Short integers are only available on Minerva ROMs, when integer tokenisation is enabled.

integer% (range -32768 to 32767)

float (eg. 1.23 or any numbers outside the integer% range)

string$ (eg. 'Hello')

GET enables variables which have been stored in this manner to be retrieved from a file opened to the given channel (default #3). The variable stored at the current position in the file (or the file position given with the command, if the first variant is used) is read directly into the variable name given with the command.  If you provide more than one variable name as the second, third parameter etc, then more variables will be read from the file in one go.

If the first variant is used, the file position is always calculated as an absolute distance from the start of the file. However, to help you, if you supply a variable for the file_position (eg. GET \pointer), this variable will always be updated to the current file pointer at the end of the command.

If no variable is specified, the file pointer will be set to the specified position if the first variant is used.

CROSS-REFERENCE:
See PUT, BPUT, BGET, LGET, WGET. 
